<?php
//设置utf-8输出
$response->header('Content-Type','text/html; charset=utf-8');
//兼容fpm的全局变量
$_SERVER = [];
if (isset($request->server)) {
    foreach ($request->server as $k => $v) {
        $_SERVER[strtoupper($k)] = $v;
    }
}
if (isset($request->header)) {
    foreach ($request->header as $k => $v) {
        $_SERVER[strtoupper($k)] = $v;
    }
}
$_GET = [];
if (isset($request->get)) {
    foreach ($request->get as $k => $v) {
        $_GET[$k] = bob_input($v);//输入过滤
    }
}
$_POST = [];
if (isset($request->post)) {
    foreach ($request->post as $k => $v) {
        $_POST[$k] = bob_input($v);//输入过滤
    }
}
$_COOKIE = [];
if (isset($request->cookie)) {
    foreach ($request->cookie as $k => $v) {
        $_COOKIE[$k] = $v;
    }
}
$_FILES = [];
if (isset($request->files)) {
    foreach ($request->files as $k => $v) {
        $_FILES[$k] = $v;
    }
}